home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Path: in2.uu.net!world!bobduff
- From: bobduff@world.std.com (Robert A Duff)
- Subject: Re: C/C++ knocks the crap out of Ada
- Message-ID: <Do9tMv.2p3@world.std.com>
- Organization: The World Public Access UNIX, Brookline, MA
- References: <00001a73+00002504@msn.com> <4i4s5f$igc@solutions.solon.com> <3146E324.5C1E@lfwc.lockheed.com> <4i98gg$8n1@solutions.solon.com>
- Date: Thu, 14 Mar 1996 18:49:43 GMT
-
- In article <4i98gg$8n1@solutions.solon.com>,
- Peter Seebach <seebs@solutions.solon.com> wrote:
- >No. And, SINCE THE LANGUAGE DOES NOT SPECIFY COMPILATION ORDER, COMPILATION
- >ORDER HAS NOTHING TO DO WITH C.
-
- There's some misinformation going on here. The Ada RM does *NOT*
- require a particular compilation order. Neither does C.
-
- Some Ada compilers require a particular compilation order, but this is
- not necessary. For example, using GNAT, you can compile in any order
- you like, and you can even compile two things in parallel. This is good
- -- it's nothing but a pain in the butt to have to follow some silly
- ordering rules.
-
- What Ada *does* require is consistency. If two units refer to a third
- unit, then they have to refer to the same version of the third unit (or
- compatible versions of it). This is really necessary in C, too, when
- using include files, the difference being that Ada compilers are
- required to tell you about inconsistencies, whereas C compilers are not.
-
- In both C and Ada, you really need an additional tool that automatically
- figures out which things need to be recompiled when you make a change.
- Ada does *NOT* require such a tool to exist, and neither does C. It is
- possible to write such a tool for *both* languages -- for Ada, it parses
- the with_clauses; for C it parses the #include statements. In fact,
- such a tool is a lot easier to write for C than for Ada. The problem
- with 'make' is that you have to type in the dependences by hand. But
- nothing about C requires the use of 'make' -- it is entirely possible to
- have a more automatic tool. IMHO, direct use of 'make', with
- hand-written make files, is the wrong approach for C or Ada or any other
- language (unless you have fewer than about 5 files in your program).
-
- So, neither C nor Ada give you what you really want -- a tool that
- automatically builds your program. So I don't think you can argue that
- either language is better than the other in this regard. This is fine
- -- it's not necessary to specify every imaginable Good Thing as part of
- your *language* standard.
-
- You could argue that Ada is better because it complains when there's an
- inconsistency. Fine, but for a large program, it's a nightmare to
- figure out what to *do* about that inconsistency, unless you have an
- automatic tool (not 'make'). So, in practice, you need a separate tool
- anyway, and if you use it religiously, you won't get burned by
- inconsistencies in *either* language.
-
- - Bob
-